<?xml version="1.0" encoding="iso-8859-1"?>

<!-- edited with XMLSPY v5 rel. 3 U (http://www.xmlspy.com) by Bastian Guddat (HaCon) -->
<!-- ======================================================================= -->
<!-- location validation result -->
<!-- connection result -->
<!-- -->
<!-- Version history:  ver. 1.0   initial version  -  Sascha Heinze 26.04.05 -->
<!--                   ver. 1.1   added annotations - Sascha Heinze, 17.05.05 -->
<!--                   ver. 1.2   added attribute output to the element ReqLoc -->
<!--                   ver. 1.3   modified for SBB XML interface - Jan Fricke 22.06.07 -->
<!--                   ver. 1.3.1 added result type TrasinSearchResult - Jan Fricke 23.06.07 -->
<!-- ======================================================================= -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  <xs:attributeGroup name="attlist.ReqCResC">
    <xs:attribute name="ver" type="xs:string" use="required" fixed="1.1">
      <xs:annotation>
        <xs:documentation>
          Current version of the Interface. The version given in the result must match the version specified in the request.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="prod" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
          Free form string identifying the application that produced the xml.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="lang" use="required">
      <xs:annotation>
        <xs:documentation>
          Specifies the language for the request. Possible values depend on the languages contained in the actual Hafas system. Almost all versions will contain german (DE) and english (EN). Other possible values include FR, IT, DK, PL.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="DE" />
          <xs:enumeration value="EN" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:element name="LocValRes">
    <xs:annotation>
      <xs:documentation>
        The LocValRes takes matched locations, returned by Hafas as a response to a LocValReq. In case of Address, Poi or Station, these Locations can directly be taken as part of a subsequent connectionrequest (ConReq). If the returned element is a ReqLoc, this location may not be inserted into a ConReq, but must be refined. This means that another LocValReq step must be performed, if the user selects this location. The ReqLoc therefore must be inserted as is into this subsequent LocValReq. (The ReqLoc will have filled the attribute refine instead of match, telling Hafas to perform a refinement step instead of the initial request.) A single LocValRes can can contain any type of Location in an arbitrary order.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Err" minOccurs="0" maxOccurs="unbounded" />
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:choice>
            <xs:element ref="Station" />
          </xs:choice>
        </xs:choice>
      </xs:sequence>
      <xs:attributeGroup ref="attlist.LocValRes" />
    </xs:complexType>
  </xs:element>
  <xs:attributeGroup name="attlist.LocValRes">
    <xs:attribute name="flag" use="required">
      <xs:annotation>
        <xs:documentation>
          The attribute flag indicates, whether the contained locations are ready to perform a subsequent ConReq (FINAL), if a refinement step has to be performed (META) or if both possibilites occur within the result (MIXED)
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="META" />
          <xs:enumeration value="FINAL" />
          <xs:enumeration value="MIXED" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:element name="Err">
    <xs:annotation>
      <xs:documentation>
        If an error occurs, the element Err indicates the type of the error and a descriptive text. This text is meant to be used for logging purposes or other internal use. Normally this message should not be presented to the user.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attributeGroup ref="attlist.Err" />
    </xs:complexType>
  </xs:element>
  <xs:attributeGroup name="attlist.Err">
    <xs:attribute name="code" type="xs:token" use="required">
      <xs:annotation>
        <xs:documentation>
          The attribute code contains an identifier for the current error. This code is meant to be used by the application. A list containing possible errorcodes will be available in a separate document.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="text" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
          The attribute text specifies a human readable description of the current error.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="level" default="E">
      <xs:annotation>
        <xs:documentation>
          The attribute level specifies the importance of the current error. Valid values are M for messages, W for warnings, E for errors and F for fatal errors.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="M" />
          <xs:enumeration value="W" />
          <xs:enumeration value="E" />
          <xs:enumeration value="F" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:element name="Prod">
    <xs:annotation>
      <xs:documentation>
        The element Prod contains the product choice and related things. The element prod is placed within the Start ans the Via elements. The product choice defined in Prod is valid for the section of the Journey, that starts at the current location and ends at the next Via or Dest element.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attributeGroup ref="attlist.Prod" />
    </xs:complexType>
  </xs:element>
  <xs:attributeGroup name="attlist.Prod">
    <xs:attribute name="prod">
      <xs:annotation>
        <xs:documentation>
          The attribute prod contains a product filter. Each means of transportation belongs to a product category. The product category of a means of transport is dependent on the data used with the current Hafas system. The concrete definements are placed in the file zugart of the Hafas raw data. There is a maximum of 16 product categories (0 - 15) in the Hafas system. The element prod contains a bitfield for these product categories. The first byte represents category 0, the second category 1, and so on. A 1 means that the category is selected for the search, a 0 means deselected. For example prod="1111000000000000" selects the categories 0 to 3 and deselects all other categories.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="[01]{16}" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="direct" default="0">
      <xs:annotation>
        <xs:documentation>
          Valid values are 0 and 1. if direct is set to 1,  this means, that on the current section of the journey only direct connections are allowed. A value of 0 allows changes in this section.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="0" />
          <xs:enumeration value="1" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="sleeper" default="0">
      <xs:annotation>
        <xs:documentation>
          If set to 1, on this section only night trains  containing beds are allowed. In this case, the direct flag will be set to one implicitly. The default is 0 to allow for searches of all sorts of trains.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="0" />
          <xs:enumeration value="1" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="couchette" default="0">
      <xs:annotation>
        <xs:documentation>
          If set to 1, in this section only night trains containing couchettes are allowed. In this case the direct flag is set to 1 implicitly. The default is 0 to allow searches for all sorts of trains.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="0" />
          <xs:enumeration value="1" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="bike" default="0">
      <xs:annotation>
        <xs:documentation>
          If set o 1, only trains allowing the transport of bicycles are allowed in this section. The default is 0 to allow searches for all sorts of trains.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="0" />
          <xs:enumeration value="1" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:element name="ResC">
    <xs:annotation>
      <xs:documentation>
        ResC is the container for any type of results, calculated by the Hafas server.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Err" minOccurs="0" maxOccurs="unbounded" />
        <xs:choice>
          <xs:element ref="ConRes" />
          <xs:element ref="LocValRes" minOccurs="0" maxOccurs="unbounded" />
        </xs:choice>
      </xs:sequence>
      <xs:attributeGroup ref="attlist.ReqCResC" />
    </xs:complexType>
  </xs:element>
  <xs:element name="ConRes">
    <xs:annotation>
      <xs:documentation>
        A ConRes is the connection result. This Type of result is returned as a resonse to a connection request (ConReq) or a connection scroll request (ConScrReq).
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Err" minOccurs="0" maxOccurs="unbounded" />
        <xs:element name="ConResCtxt" minOccurs="0" maxOccurs="unbounded" />
        <xs:element ref="ConnectionList" minOccurs="0" />
      </xs:sequence>
      <xs:attributeGroup ref="attlist.ConRes" />
    </xs:complexType>
  </xs:element>
  <xs:attributeGroup name="attlist.ConRes">
    <xs:attribute name="dir" use="required">
      <xs:annotation>
        <xs:documentation>
          dir represents the direction that the result represents. O means outward connections, R means retuen connections. Currently only outward connections are calculated, so this value will be set to O.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="O" />
          <xs:enumeration value="R" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:element name="ConnectionList">
    <xs:annotation>
      <xs:documentation>
        The ConnectionList element is the container for all connections calculated by the Hafas server.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Err" minOccurs="0" />
        <xs:element ref="Connection" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="Date" type="xs:string">
    <xs:annotation>
      <xs:documentation>
        The element date contains the base date for a connection. The base date is the date at which the conection starts. All time elements refer to the base date.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="TimeType">
    <xs:sequence>
      <xs:element ref="Time" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="Time">
    <xs:annotation>
      <xs:documentation>
        The format of the Time element is [dd:]hh:mm. dd represents a day offset. All offsets are relative to the base date of the connection. For example a time 01:12:30 means 12:30 at the first day following the day specified as the base date in the Date element in the Overview section of the connection.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:attributeGroup ref="attlist.Time" />
    </xs:complexType>
  </xs:element>
  <xs:attributeGroup name="attlist.Time">
    <xs:attribute name="delay">
      <xs:annotation>
        <xs:documentation>
          This attribute is not used at the moment.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:element name="Coord" type="LocationType">
    <xs:annotation>
      <xs:documentation>
        The Coord element represents a coordinate. In connection requests, the Coord element can be used to describe the start and the destination of a request. Coord elements can not be obtained via a LocValReq, instead the user is responsible to create valid Coord elements.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="LocationType">
    <xs:attributeGroup ref="attlist.Location" />
  </xs:complexType>
  <xs:attributeGroup name="attlist.Location">
    <xs:attribute name="name" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          The attribute name contains the output name of a location.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="x" type="xs:integer">
      <xs:annotation>
        <xs:documentation>
          The x-coordinate of the location.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="y" type="xs:integer">
      <xs:annotation>
        <xs:documentation>
          The y-coordinate of the location.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="z" type="xs:integer">
      <xs:annotation>
        <xs:documentation>
          The z-coordinate is currently not used.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="type" default="WGS84">
      <xs:simpleType>
        <xs:annotation>
          <xs:documentation>
            The attribute type specifies the format of the coordinate. WGS84 is the default and the preferred format.
          </xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:token">
          <xs:enumeration value="HAFAS_GEO" />
          <xs:enumeration value="HAFAS_HANNOVER" />
          <xs:enumeration value="WGS84" />
          <xs:enumeration value="CH-COORD" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:complexType name="StationType">
    <xs:complexContent>
      <xs:extension base="LocationType">
        <xs:attributeGroup ref="attlist.StationType" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Station" type="StationType">
    <xs:annotation>
      <xs:documentation>A station</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:attributeGroup name="attlist.StationType">
    <xs:attribute name="externalId">
      <xs:annotation>
        <xs:documentation>
          The externalId contains an identifier for the current station/Address/POI. This identifier can only be used for subsequent XML-Requests.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="uicCode" type="xs:integer">
      <xs:annotation>
        <xs:documentation>
          The country code of the UIC.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="externalStationNr">
      <xs:annotation>
        <xs:documentation>
          The attribute externalStationNr contains the EVA-ID for the current station. This attribute will not be present for Adresses, POIs and stations found in the delfi context. If nessessary, this id can be used in subsequent HTML-based requests.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:element name="Text">
    <xs:complexType mixed="true">
      <xs:attributeGroup ref="attlist.Text" />
    </xs:complexType>
  </xs:element>
  <xs:attributeGroup name="attlist.Text">
    <xs:attribute name="lang">
      <xs:annotation>
        <xs:documentation>
          The attribute lang specifies the language of the current text element. Possible values are data dependant(see ReqC.lang)
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="DE" />
          <xs:enumeration value="DK" />
          <xs:enumeration value="EN" />
          <xs:enumeration value="FR" />
          <xs:enumeration value="PL" />
          <xs:enumeration value="IT" />
          <xs:enumeration value="MACRO" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:element name="NamedValue">
    <xs:annotation>
      <xs:documentation>
        A named value is used to specify generic extensions. The attribute name specifies the name of the element, the attribute valuetakes the corresponding value.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attributeGroup ref="attlist.NamedValue" />
    </xs:complexType>
  </xs:element>
  <xs:attributeGroup name="attlist.NamedValue">
    <xs:attribute name="name" type="xs:string" use="required" />
    <xs:attribute name="value" type="xs:string" use="required" />
  </xs:attributeGroup>
  <xs:element name="ServiceDays">
    <xs:annotation>
      <xs:documentation>
        The element ServiceDays specifies the days, the current connection is served. There are two representations of the servicedays. The ServiceBits take a bitfield of the servicedays. In addition there is a textual description of the servicedays, separated into regular servicedays (Mo-Fr) and irregular servicedays (not 24., 25, 26. Dez...) The textual description is given in a macro language, where all language specific parts are substituted with macros of the form $(vt&lt;xy&gt;)
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ServiceBits" minOccurs="0" />
        <xs:element ref="RegularServiceText" minOccurs="0" />
        <xs:element ref="IrregularServiceText" minOccurs="0" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="ServiceBits" type="xs:string" />
  <xs:element name="RegularServiceText">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Text" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="IrregularServiceText">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Text" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="Attribute">
    <xs:annotation>
      <xs:documentation>
        Attributes describe the characteristics of a ConSection, such as the name of the means of transport, the category of the means of transport, general attributes like Bord Restaurant, Reservation required and other characteristics. For a detailed description of the different attributes see the attribute type. Some types of attributes can have different attribute variants (NORMAL, SHORT and LONG), containing different Levels of information.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="AttributeVariant" maxOccurs="unbounded" />
      </xs:sequence>
      <xs:attributeGroup ref="attlist.Attribute" />
    </xs:complexType>
  </xs:element>
  <xs:attributeGroup name="attlist.Attribute">
    <xs:attribute name="priority">
      <xs:annotation>
        <xs:documentation>
          Attributes of type NORMAL do have a priority, describing the importance of the current attribute. Therange for the priority is 0 - 999. lower values have a higher priority, so 0 is the most important priority.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:integer">
          <xs:minInclusive value="0" />
          <xs:maxInclusive value="999" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="type" default="NORMAL">
      <xs:annotation>
        <xs:documentation>
          There is a variety of different attributetypes, specifying different characteristics of the current consection. Attributes of type NORMAL specify classical train attributes like BordRestaurant, Carriage of Bicycles etc. Attributes of type DIRECTION show the direction of a train, this can either be the name of the destination station or the external Id of the station, depending on the underlying data. Not all means of transportation do have a DIRECTION entry. CATEGORY specifies the the category of the train. Attributevariants of type SHORT show the internally used description of the category and has a maximum length of eight characters. Attributevariants of type NORMAL show the output category of the train and also has a maximum length of eight characters, this should be used for output. Attributevariants of type LONG take a more detailed description (like Intercity Express). Dependant on the data, the Attributevariants of type NORMAL and LONG might not be available, in which case the output of the category should be suppressed. Attributes of type INTERNALCATEGORY... Attributes of type OPERATOR contain a description of the operator of the train. Attributes of type NAME take the name of the means of transport. Please note that in some rare cases the means of transort does not have a name (for example any english trains do not have names in the data), in which case the attribute will not be printed out. Attributes ofvtype NUMBER take the external train number.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="NORMAL" />
          <xs:enumeration value="DIRECTION" />
          <xs:enumeration value="CATEGORY" />
          <xs:enumeration value="INTERNALCATEGORY" />
          <xs:enumeration value="OPERATOR" />
          <xs:enumeration value="NAME" />
          <xs:enumeration value="NUMBER" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="code">
      <xs:annotation>
        <xs:documentation>
          The attribute code will be available for attributes of type NORMAL and CATEGORY. For Attributes of type NORMAL it represents the internal two-byte code of the ATTRIBUTE.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:maxLength value="2" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:element name="AttributeVariant">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Text" maxOccurs="3" />
      </xs:sequence>
      <xs:attributeGroup ref="attlist.AttributeVariant" />
    </xs:complexType>
  </xs:element>
  <xs:attributeGroup name="attlist.AttributeVariant">
    <xs:attribute name="type" default="NORMAL">
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="SHORT" />
          <xs:enumeration value="NORMAL" />
          <xs:enumeration value="LONG" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:element name="Connection">
    <xs:annotation>
      <xs:documentation>
        The element Connection is a container for all the data belonging to one connection.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Overview" />
        <xs:element ref="ConSectionList" minOccurs="0" />
        <xs:element ref="CommentList" minOccurs="0" />
      </xs:sequence>
      <xs:attributeGroup ref="attlist.Connection" />
    </xs:complexType>
  </xs:element>
  <xs:attributeGroup name="attlist.Connection">
    <xs:attribute name="id" type="xs:ID" use="required">
      <xs:annotation>
        <xs:documentation>
          Every connection is given an identifier. This identifier is guaranteed to be unique within the complete session which means, that the connections returned for an initial ConReq and for subsequent ConScrReq requests all get a different identifier.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:element name="Duration" type="TimeType">
    <xs:annotation>
      <xs:documentation>
        The element Duration contains the duration of the current connection in the format hh:mm
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="Transfers" type="xs:string">
    <xs:annotation>
      <xs:documentation>
        The element Transfers contains the number of transfers in the current connection. Walks will not be counted: Train-&gt;Walk-&gt;Train counts a one transfer. As the maximum number of conCsection within a connection is 12, the maximum number of transfers is 11. the minimum is of course 0 for direct connections
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="Overview">
    <xs:annotation>
      <xs:documentation>
        The element overview takes all relevant elements to display an overview of the connection. This includes Date (the base date), Departure, Arrival, Transfers, Duration, ServiceDays and ContextURL.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Date" />
        <xs:element ref="Departure" />
        <xs:element ref="Arrival" />
        <xs:element ref="Transfers" />
        <xs:element ref="Duration" />
        <xs:element ref="ServiceDays" />
        <xs:element ref="Products" />
        <xs:element ref="ContextURL" minOccurs="0" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="Products">
    <xs:annotation>
      <xs:documentation>
        The Products section shows the product categories, used in the current connection.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Product" maxOccurs="12" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="Product">
    <xs:complexType>
      <xs:attributeGroup ref="attlist.Product" />
    </xs:complexType>
  </xs:element>
  <xs:attributeGroup name="attlist.Product">
    <xs:attribute name="cat" type="xs:string" />
  </xs:attributeGroup>
  <xs:element name="ContextURL">
    <xs:annotation>
      <xs:documentation>
        The element ContextURL takes an URL that generates a more detailed view of the connection specified in the overview. If you need this element please contact  us. By default, this element will not be available.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attributeGroup ref="attlist.ContextURL" />
    </xs:complexType>
  </xs:element>
  <xs:attributeGroup name="attlist.ContextURL">
    <xs:attribute name="url" type="xs:anyURI" use="required" />
  </xs:attributeGroup>
  <xs:element name="ConSectionList">
    <xs:annotation>
      <xs:documentation>
        The ConSectionList is a container for the consections that form the connection. A connecton can have a maximum of 12 ConSections. Sections of type Walk and Transfer are counted as a ConSection.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ConSection" maxOccurs="12" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="ConSection">
    <xs:annotation>
      <xs:documentation>
        A ConSection consists of a Departure an Arrival and an element Journey, Walk, Transfer or GisRoute, giving more informations about the current ConSection.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Departure" />
        <xs:choice>
          <xs:element ref="Journey" />
          <xs:element ref="Walk" />
          <xs:element ref="Transfer" />
        </xs:choice>
        <xs:element ref="Arrival" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="Departure">
    <xs:annotation>
      <xs:documentation>
        The departure location of a ConSection
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="BasicStop" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="Arrival">
    <xs:annotation>
      <xs:documentation>
        The arrival location of a ConSection
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="BasicStop" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="BasicStop">
    <xs:annotation>
      <xs:documentation>
        The element BasicStop represents a Location, as a part of the current ConSection. It contains a Location (Station, Address, Poi) together with the arrival and departure times at this location, as well as some other information like platforms.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="StAttrList" minOccurs="0" maxOccurs="unbounded">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="StAttr" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:attribute name="code" type="xs:string" use="optional"></xs:attribute>
                  <xs:attribute name="text" type="xs:string" use="optional"></xs:attribute>
                  <xs:attribute name="priority" type="xs:int" use="optional"></xs:attribute>
                  <xs:attribute name="type" type="xs:string" use="optional"></xs:attribute>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:choice>
          <xs:element ref="Station" />
        </xs:choice>
        <xs:element ref="Arr" minOccurs="0" />
        <xs:element ref="Dep" minOccurs="0" />
      </xs:sequence>
      <xs:attributeGroup ref="attlist.BasicStop" />
    </xs:complexType>
  </xs:element>
  <xs:attributeGroup name="attlist.BasicStop">
    <xs:attribute name="type" default="NORMAL">
      <xs:annotation>
        <xs:documentation>
          The attribute type classifies the BasicStop either to be a normal or a virtual stop. Virtual stops can be used to display tariff borders or national boundaries, they normally do not represent physical stops, where people can leave and enter a train.
        </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="NORMAL" />
          <xs:enumeration value="VIRTUAL" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="index">
      <xs:annotation>
        <xs:documentation>
          The attribute index specifies an index into the passlist of the current train.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:element name="Platform">
    <xs:annotation>
      <xs:documentation>
        The element Platform supplies information about the Departure- and Arrivalplatform at a Station. The maximum length of this string is 8 characters.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Text" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="ArrDepType">
    <xs:complexContent>
      <xs:extension base="TimeType">
        <xs:sequence>
          <xs:element ref="Platform" minOccurs="0" />
        </xs:sequence>
        <xs:attributeGroup ref="attlist.ArrDep" />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:attributeGroup name="attlist.ArrDep">
    <xs:attribute name="getOut" default="YES">
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="YES" />
          <xs:enumeration value="NO" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="getIn" default="YES">
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="YES" />
          <xs:enumeration value="NO" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:element name="Dep" type="ArrDepType">
    <xs:annotation>
      <xs:documentation>
        Information for the departure of a train at the current BasicStop. This includes the departure time, the departure platform and the information whether it is allowed to enter the train at the current stop or not.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="Arr" type="ArrDepType">
    <xs:annotation>
      <xs:documentation>
        Information for the arrival of a train at a current stop. This includes the arrival time, the arrival platform and the information, whether it is allowed to get out of the train at the current stop.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="Journey">
    <xs:annotation>
      <xs:documentation>
        The element Journey contains the List with the JourneyAttributes valid for the current ConSection, as well as (optionally) a PassList containing extended Information about the passed stations.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="JHandle" minOccurs="0" maxOccurs="unbounded">
          <xs:complexType>
            <xs:attribute name="tNr" type="xs:int"></xs:attribute>
            <xs:attribute name="cycle" type="xs:int"></xs:attribute>
            <xs:attribute name="puic" type="xs:int"></xs:attribute>
          </xs:complexType>
        </xs:element>
        <xs:element ref="JourneyAttributeList" />
        <xs:element ref="PassList" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="JourneyAttributeList">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="JourneyAttribute" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="JourneyAttribute">
    <xs:annotation>
      <xs:documentation>
        A JourneyAttribute contains an element Attribute as well as validity informations for this attribute. An attribute must not be valid for the whole ConSection and it must not be valid at all the ServiceDays of the connection. So the JourneyAttribute can take two attributes from and to, specifying an index into the PassList. Every BasicStop within a PassList has an attribute index. The Attribute is valid from the BasicStop with the index matching the index given in the attribute from, to the BasicStop with the index matching the index given in the attribute to. The element SeviceDays specifies the days were the Attribute is valid. if the element ServiceDays is not given, the attribute is valid at all the servicedays of the connection. The restriction of the ServiceDays of an Attribute is not used at the moment, but may be activated in later versions of this interface.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Attribute" />
        <xs:element ref="ServiceDays" minOccurs="0" />
      </xs:sequence>
      <xs:attributeGroup ref="attlist.JourneyAttribute" />
    </xs:complexType>
  </xs:element>
  <xs:attributeGroup name="attlist.JourneyAttribute">
    <xs:attribute name="from" type="xs:integer" />
    <xs:attribute name="to" type="xs:integer" />
  </xs:attributeGroup>
  <xs:element name="Walk">
    <xs:annotation>
      <xs:documentation>
        A Walk is an unrouted transition with a duration of max. 15 minutes.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Duration" />
        <xs:element ref="JourneyAttributeList" minOccurs="0" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="Transfer">
    <xs:annotation>
      <xs:documentation>
        A Transfer is an unrouted transition with a duration of more than 15 minutes.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Duration" />
        <xs:element ref="JourneyAttributeList" minOccurs="0" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="PassList">
    <xs:annotation>
      <xs:documentation>
        The element PassList contains informations about the passed stops of the current ConSection. It contains a sequence of BasicStop elements
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="BasicStop" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="CommentList">
    <xs:annotation>
      <xs:documentation>
        The CommentList may contain additional informations for the current connection/consection. This feature is not used in the current version of the interface.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Comment" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="Comment">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Text" maxOccurs="unbounded" />
      </xs:sequence>
      <xs:attributeGroup ref="attlist.Comment" />
    </xs:complexType>
  </xs:element>
  <xs:attributeGroup name="attlist.Comment">
    <xs:attribute name="id" type="xs:ID" />
  </xs:attributeGroup>
  <xs:element name="TrainSearchRes">
    <xs:annotation>
      <xs:documentation>
        The TrainSearchRes contains the station list, which are passed on the journey.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Err" minOccurs="0" maxOccurs="unbounded" />
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:choice>
            <xs:element ref="BasicStop" />
          </xs:choice>
        </xs:choice>
      </xs:sequence>
      <xs:attributeGroup ref="attlist.TrainSearchRes" />
    </xs:complexType>
  </xs:element>
  <xs:attributeGroup name="attlist.TrainSearchRes">
    <xs:attribute name="name" type="xs:string">
      <xs:annotation>
        <xs:documentation>
          The attribute name contains the output name of the train.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:attributeGroup>
</xs:schema>